package com.xdf.ecommerce.service.communication.hystrix;

import com.xdf.ecommerce.service.communication.AuthorityFeignClient;
import com.xdf.ecommerce.vo.JwtToken;
import com.xdf.ecommerce.vo.UsernameAndPassword;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author chanchaw
 * @create 2025-10-31 7:55
 */
@Service
@Slf4j
public class AuthorityFeignClientFallback implements AuthorityFeignClient {
    @Override
    public JwtToken getToken(UsernameAndPassword usernameAndPassword) {
        log.info("feign请求登录token失败，执行后备模式，线程名：[{}]", Thread.currentThread().getName());
        return new JwtToken("chanchaw");
    }
}
